package com.landinfo.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.vividsolutions.jts.geom.Point;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * The Region entity.
 * Gps
 */

/**
 * Region entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_gps_location")
public class GpsLocation implements Serializable {

    // Fields
    @Id
    @Column(name = "id", length = 36)
    //@GeneratedValue(generator = "system-uuid")
    @GeneratedValue(generator = "id")
    //@GenericGenerator(name = "system-uuid", strategy = "uuid2")
    @GenericGenerator(name = "id", strategy = "assigned")
    private String id;

    @Column(name = "x")
    private Double x;

    @Column(name = "y")
    private Double y;

    @Column(name = "z")
    private Double z;

    @Column(name = "author")
    private String author;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_datetime")
    private Date createDateTime;

    @Column(name = "parent_id", length = 36)
    private String parentId;

    @Column(name = "dynamic_tablename", length = 100)
    private String dynamicTableName;

    @Column(name = "device_id")
    private String deviceId;

    @Column(name = "jianceyangxian")
    private Long jianceyangxian;

//    @Column(columnDefinition = "geometry(Point,4326)")
//    private Point geom;


    // Constructors

    /**
     * default constructor
     */
    public GpsLocation() {
        // org.hibernate.spatial.GeolatteGeometryType.GeometryType
    }


    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Double getX() {
        return x;
    }

    public void setX(Double x) {
        this.x = x;
    }

    public Double getY() {
        return y;
    }

    public void setY(Double y) {
        this.y = y;
    }

    public Double getZ() {
        return z;
    }

    public void setZ(Double z) {
        this.z = z;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getCreateDateTime() {
        return createDateTime;
    }

    public void setCreateDateTime(Date createDateTime) {
        this.createDateTime = createDateTime;
    }

    public String getDynamicTableName() {
        return dynamicTableName;
    }

    public void setDynamicTableName(String dynamicTableName) {
        this.dynamicTableName = dynamicTableName;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public Long getJianceyangxian() {
        return jianceyangxian;
    }

    public void setJianceyangxian(Long jianceyangxian) {
        this.jianceyangxian = jianceyangxian;
    }

//    public Point getGeom() {
//        return geom;
//    }
//
//    public void setGeom(Point geom) {
//        this.geom = geom;
//    }
}
